﻿<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <title></title>
        <script type="text/javascript" src="../core/core.js"></script>
        <script type="text/javascript" src="../core/magi.js" ></script>
        <style type="text/css">
        .logs{
            background: #000;
            color: #fff;
            min-height: 100px;
            padding: 10px;
            line-height: 16px;
            font-size: 12px;
            font-family: arial;
            margin: 6px 0px;
        }
        .logs hr{
            border:0px;
            border-bottom: 1px dashed #fff;
        }
        .list{
            font-size: 14px;
         
        }
        </style>

    </head>
    <body>

        <div class="list"><strong>模版缓存管理：</strong></div>
        <form action="create_page_cache.php" method="post" style="margin:6px 0px;">
            路径：<input type="text" value="magi/themes" name="path" />(相对路径,例如：magi/themes) <input type="submit" value="生成" />
        </form>
       
        <div>
            
            <div class="list"><strong>日志管理：</strong></div>
            <input type="button" onclick="javascript:magi.debug.clean();$('.logs')[0].innerHTML='';" value="清空日志" />
            <input type="button" onclick="interval(this);" value="自动刷新" />
            <div class="logs"></div>
        </div>
         <script type="text/javascript">

            function interval(obj){
                if(obj.value=='自动刷新'){
                     u_time();
                    window.clock = setInterval(function(){
                        u_time();
                    },400);
                    obj.value='停止刷新';
                }else{
                    clearInterval(window.clock);
                      obj.value='自动刷新';
                }
            }

            function u_time(){
                 var al = magi.cache.get('_magi_debug_log');
                 al = (al)?al:[];
                $('.logs')[0].innerHTML = al.join('');
            }
             
            u_time();
        </script>
    </body>
</html>
